package org.bonn.ooka.core;

public class CREUtil {

	public static EScope stringToScope(String scope){
		if(scope.toLowerCase().contains("test"))
			return EScope.SCOPE_UNDER_TEST;
		if(scope.toLowerCase().contains("production"))
			return EScope.SCOPE_IN_PRODUCTION;
		if(scope.toLowerCase().contains("inspection"))
			return EScope.SCOPE_UNDER_INSPECTION;
		if(scope.toLowerCase().contains("maintenance"))
			return EScope.SCOPE_IN_MAINTENANCE;
		throw new IllegalArgumentException("Wrong scope given: " + scope);
	}
}
